﻿@using Microsoft.Web.Helpers
@model Pro260Website.Models.ListingViewModel<Domain.Entity.Video>
@{
    ViewBag.Title = "Videos";
}

<h2 class="title @Html.GetColor(Request.Cookies["color"])">Videos</h2>

<table class="defaultGrey">
    <tr>
        <th></th>
        <th>Video Path Name</th>
    </tr>
    @foreach (var v in Model.Items)
    {
        if (!string.IsNullOrEmpty(v.VideoName))
        {
        <tr>
            <td>
                @{
            Pro260Website.Models.VideoViewModel viewModel = new Pro260Website.Models.VideoViewModel()
            {
                YoutubeID = string.Empty,
                VideoName = v.VideoName
            };

            Html.RenderPartial("VideoDisplay", viewModel);
                 }
            </td>            
            <td>@v.VideoName</td>
        </tr>
        }
    }
</table>
<br /><br /><br />
@Html.ActionLink("Upload Video", "UploadVideo")
<br />
<div id="pagerForm" class="pager @Html.GetColor(Request.Cookies["color"])">
        @Html.PageLinks(Model.PagingInfo, i => Url.Action("Listings", "Video", new {page = i, pageSize = Model.PagingInfo.ItemsPerPage }))
    </div>